<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<style>
.btn[disabled] {
	background-color: #eee;
}
</style>
<div class="table-scrollable">
	<div style="margin-top: 20px;"></div>
	<table class="table table-striped table-hover table-info">
		<thead style="background-color: red;">
			<tr>
				<th><a class="depressedSecond" onclick="chooseAll(this);">全选</a></th>
				<th style="width: 20%;">产品名称</th>
				<th style="width: 20%;">我司货号</th>
				<!-- <th>单位</th>
				<th>包装</th>
				<th>箱数</th>
				<th>毛重</th>
				<th>净重</th>
				<th>包装体积</th> -->
				<th style="width: 20%;">入库时间</th>
				<th>入库数量</th>
				<th>状态</th>
				<th style="width: 15%; text-align: center;">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.result}" var="put" varStatus="vs">
				<tr>
					<td><input type="checkbox" value="${put.id }" /></td>
					<td class="showTd"><c:choose>
							<c:when test="${fn:length(put.product.name)>20 }">
							  ${fn:substring(put.product.name, 0, 20)}... 
							  <!-- 隐藏DIV -->
								<div class="modal-content div-hidden">${put.product.name }</div>
							</c:when>
							<c:otherwise>
							${put.product.name}
						</c:otherwise>
						</c:choose></td>
					<td>${put.product.code}</td>
					<td><fmt:formatDate pattern="yyyy-MM-dd MM:hh:ss"
							value="${put.datetime }" /></td>
					<td>${put.realbox }</td>
					<td>${put.putStatus.name }</td>
					<td><a href="javascript:;" class="btn btn-sm blue"
						onclick="update('/put/put?id=${put.id}')"> <i
							class="fa fa-edit">&nbsp;编辑</i></a> <a href="javascript:;"
						class="btn btn-sm btn-wanted"
						onclick="makeSurePO('${put.id}','/put/batchMakeSure');"
						<c:if test="${put.putStatus.name == '已确认' }">disabled="disabled"</c:if>>
							<i class="fa fa-truck">&nbsp;确认</i>
					</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</div>
<div class="pageination-panel">${page}</div>
<script>
	$('.div-hidden').hide();
	$(".showTd").mouseleave(function() {
		$(this).find('div').hide();
	})
	$(".showTd").mouseover(function() {
		//alert($(this).find('div').html());
		$(this).find('div').show();
	});
</script>